4ed527
@@ -1526,9 +1526,11 @@
private static boolean isRegex(String pattern) {
       // child can be EXPR AS ALIAS, or EXPR.
       ASTNode child = (ASTNode) exprList.getChild(i);
       boolean hasAsClause = (!isInTransform) && (child.getChildCount() == 2);
-
+      
       // EXPR AS (ALIAS,...) parses, but is only allowed for UDTF's
-      if (!isUDTF && child.getChildCount() > 2) {
+      // This check is not needed and invalid when there is a transform b/c the 
+      // AST's are slightly different.
+      if (!isInTransform && !isUDTF && child.getChildCount() > 2) {
         throw new SemanticException(ErrorMsg.INVALID_AS.getMsg());
       }
 
